From 8a88745186fb88c1db5b545f6feb8f88f7e7615e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 20 Nov 2016 07:46:47 -0500 Subject: [PATCH] Some additions to the migration guide --- docs/reference/gtk/migrating-3to4.xml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml index e8ce2aaaef..7b7c36fb0f 100644 --- a/docs/reference/gtk/migrating-3to4.xml +++ b/docs/reference/gtk/migrating-3to4.xml @@ -52,6 +52,14 @@ +
+ Do not use widget style properties + + Style properties do not exist in GTK+ 4. You should stop using them in + your custom CSS. + +
+
Review your window creation flags @@ -98,6 +106,14 @@
+
+ Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window() + + These functions are not supported in GTK+ 4. Instead, either use backend-specific + APIs, or render your widgets using gtk_widget_render(). + +
+
@@ -110,6 +126,17 @@ have been either impossible or impractical. +
+ Adapt to GdkWindow API changes + + The gdk_window_new() function has been replaced by a number of more + specialized constructors: gdk_window_new_toplevel(), gdk_window_new_popup(), + gdk_window_new_temp(), gdk_window_new_child(), gdk_window_new_input(), + gdk_wayland_window_new_subsurface(). Use the appropriate ones to create + your windows. + +
+
Adapt to GtkStyleContext API changes @@ -121,6 +148,15 @@
+
+ Adapt to GtkCssProvider API changes + + In GTK+ 4, the various #GtkCssProvider load functions have lost + their #GError argument. If you want to handle CSS loading errors, + use the #GtkCssProvider::parsing-error signal instead. + +
+
Stop using GtkContainer::border-width @@ -149,6 +185,14 @@
+
+ Use gtk_widget_measure + + gtk_widget_measure replaces the various gtk_widget_get_preferred_ functions + for querying sizes. + +
+
Adapt to drawing model changes -- 2.30.2